<HTML>
 <head>
  <link rel="icon" type="image/ico" href="/images/favicon.ico" />
  </head>
  <title>
 Event Creation
   </title>
   <link type="text/css" rel="stylesheet" href="/stylesheets/landscapes/style.css" />
    <link rel="icon" type="image/ico" href="/images/favicon.ico" />
<body>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>


<%
	String Status = request.getParameter( "CreationResult" );
	if( null == Status)
		{}	
	else if	(Status.equals( "Success" ) )
		{
%>
		<p>Event Successfully Created</p>
<%
		} 
	else if (Status.equals( "Failure" ) ){
%>
<p>Event Creation Failed</p>
<% }

%>


<%
    UserService userService = UserServiceFactory.getUserService();
    User user = userService.getCurrentUser();
    if (user != null) {
%>
<p ALIGN="CENTER">
	<font color = "#3BB9FF">
	<h2 ALIGN="CENTER">Hello, <%= user.getNickname() %>
	<br/>
	Please Fill the Following Details to Create Your Event 
    </h2>
    </font>
</p>
<%
    } else {
%>
<p>Hello!
Please Login with your Google Account here
<a href="<%= userService.createLoginURL(request.getRequestURI()) %>" style="color: #00a000">Login with Google</a>
</p>
<%
    }
%>

 <form action="/store-event" method="post" ALIGN="LEFT">
 
	<font color = "#00a000" size = "3"> 
	
    <div>Enter Event Name   <textarea name="Event_Name" rows="1" cols="40" ></textarea></div>
    <div>Enter Event Date(dd/mm/yyyy) <textarea name="Event_Date" rows="1" cols="40" ></textarea></div>
    <div>Enter Event Time(hh:mm) <textarea name="Event_Time"rows="1" cols="40" ></textarea></div>
    <div>Enter Location Name <textarea name="Event_Location" rows="1" cols="40"></textarea></div>
    <div>Enter Event Description <textarea name="Event_Description" rows="1" cols="40"></textarea></div>
    <div>Enter Event Tags (separate by , )<textarea name="Event_Tags" rows="1" cols="40"></textarea></div>
    <div><input type="submit" value="Submit Values" color = "#00a000" /></div>
    </font>
  </form>

  </body>

</HTML>